<?php
/**
 * Created by PhpStorm.
 * User: LAKECASEY
 * Date: 2018/12/11
 * Time: 18:27
 */
namespace App\model;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;

class China extends Model{
    use  SoftDeletes;
    //绑定表
    protected $table = 'china';

    /**
     * 获取所有地区名称
     */
    public function getAllarea()
    {
        return DB::select("SELECT * FROM china WHERE china.Pid=0");
    }
}